The present invention relates generally to a method for transferring data, and more particularly to a method for transferring data between two devices that insures that the data can be recovered in the event of a fault such as a power failure, controller failure, or any other fault in which data could be lost.
Write-back caching is an exemplary environment for transferring data from an initiator device to a target device. Write-back caching refers to a method of executing write requests where a host computer transfers write request data to a caching disk array controller which then transfers the write request data to storage media. Depending upon the particular write-back caching strategy being implemented by the controller, the write request data can either be written immediately to the storage media, or the write request data can be temporarily stored in a cache memory as unwritten or "dirty data" and then "flushed" or written to the storage media at some later point in time. In both cases, the controller sends back status information to the host computer indicating that the write request is complete so that the host computer can continue executing a software application. What is meant herein by the use of the term "dirty data" is data that is located in cache memory which has not yet been written to storage media. To provide meaning to the following terms "flush", "flushed" or "flushing" which are used herein, it should be appreciated that the act of "flushing" data means writing dirty data to storage media.
In bursty host computer environments, such as when the host computer intermittently has a large number of write requests, write-back caching permits the host computer to quickly transfer all of the write request data to cache memory thus increasing the performance of the host computer by reducing the host computer's overhead in executing the large number of write requests. The increased performance of the host computer when utilizing write-back caching is accompanied by an increased risk of data loss in the event of a controller failure or the like which may occur subsequent to sending the host computer status information but prior to actually writing the data to storage media. Intermediate levels of write request data protection have been developed which involve the use of controller pairs that mirror the write request data for redundancy purposes prior to sending status to the host computer.
When using two controllers to mirror write request data, a primary controller receives a write request from a host computer. The primary controller then instructs a target or alternate controller to store a copy of the write request data into a cache memory area of the alternate controller for redundancy purposes before the primary controller sends status information to the host computer, and before the primary controller places the data on the storage media. Unfortunately, there is always the risk that a fault could occur at any point in the mirroring process whereby data is lost thus leaving the mirrored data representation in an ambiguous state that would make recovery of the data by either controller impossible. What is needed therefore is a method for mirroring data between a primary controller and an alternate controller that ensures that the data can be recovered at any point in the mirroring process without leaving the mirrored data representation in an ambiguous state.